package com.innjia.base.enums;

/**
 * 合同状态
 * @author fangcheng.huang
 *
 */
public enum ContractStatusEnum {

	WAIT_SIGN("0", "待签约"),
	
	SIGNED("1", "已签约"),
	
	TERMINATING("2", "已作废");
	
	private String code;
	
	private String desc;

    ContractStatusEnum(String code, String desc) {
        this.code = code;
		this.desc = desc;
	}

	public static String getDescByCode(String code) {
		for(ContractStatusEnum e : values()) {
			if(e.getCode().equals(code)) {
				return e.getDesc();
			}
		}
		return null;
	}
	
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
	
	
	
}
